<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<!--Tutorial by tidbit, from http://ahkscript.github.io/AHK_Tutorial/
				Modified to fit with the AutoHotkey documentation.-->
		<meta name="author" content="tidbit" />
		<meta name="description" content="An AutoHotKey tutorial written by tidbit"/>
		<meta name="keywords" content="ahk, autohotkey, tutorial, beginners guide"/>
		<title>AutoHotkey Beginner Tutorial</title>
		<link href="static/theme.css" rel="stylesheet" type="text/css" />
		<script src="static/content.js" type="text/javascript"></script>
		<style type="text/css">
		.key
		{
			background-color: #f7f7f7;
			border: 1px solid #ccc;
			border-radius: 3px;
			box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 0 2px #fff inset;
			color: #333;
			display: inline-block;
			font-size: 90%;
			line-height: 1.4;
			margin: 0 0.1em;
			padding: 0.1em 0.5em;
			text-shadow: 0 1px 0 #fff;
			white-space: nowrap;
		}
		.indented {
			text-indent: 1.5em;
			margin-bottom: 1em;
		}
		</style>
	</head>
	<body>
		<div class="page">
			<h1>AutoHotkey Beginner Tutorial <span style="opacity:0.4">by tidbit</span></h1>
			<div id="toc" class="section">
				<h3>Table of Contents</h3>
				<ol>
					<li><a href="#s1" class="toci">The basics</a>
						<ol>
							<li><a href="#s11" class="toci">Downloading AutoHotkey</a></li>
							<li><a href="#s12" class="toci">How to create a script</a></li>
							<li><a href="#s13" class="toci">You cannot merge commands</a></li>
							<li><a href="#s14" class="toci">Other basic info</a></li>
						</ol>
					</li>
					<li><a href="#s2" class="toci">Hotkeys &amp; Hotstrings</a>
						<ol>
							<li><a href="#s21" class="toci">Keys and symbols</a></li>
							<li><a href="#s22" class="toci">Window specific</a></li>
							<li><a href="#s23" class="toci">Multiple hotkeys per file</a></li>
							<li><a href="#s24" class="toci">Examples</a></li>
						</ol>
					</li>
					<li><a href="#s3" class="toci">Sending key strokes</a>
						<ol>
							<li><a href="#s31" class="toci">Games</a></li>
						</ol>
					</li>
					<li><a href="#s4" class="toci">Running programs &amp; website</a></li>
					<li><a href="#s5" class="toci">Commands vs. Functions()</a>
						<ol>
							<li><a href="#s51" class="toci">Code blocks</a></li>
						</ol>
					</li>
					<li><a href="#s6" class="toci">Variables</a>
						<ol>
							<li><a href="#s61" class="toci">When to use percents</a></li>
							<li><a href="#s62" class="toci">Getting user input</a></li>
							<li><a href="#s63" class="toci">Other Examples?</a></li>
						</ol>
					</li>
					<li><a href="#s7" class="toci">Objects</a>
						<ol>
							<li><a href="#s71" class="toci">Creating Objects</a></li>
							<li><a href="#s72" class="toci">Using Objects</a></li>
						</ol>
					</li>
					<li><a href="#s8" class="toci">Other helpful goodies</a>
						<ol>
							<li><a href="#s81" class="toci">The mysterious []'s</a></li>
							<li><a href="#s82" class="toci">Finding your AHK version</a></li>
							<li><a href="#s83" class="toci">Trial and Error</a></li>
							<li><a href="#s84" class="toci">Indentation</a></li>
							<li><a href="#s85" class="toci">Asking for Help</a></li>
							<li><a href="#s86" class="toci">Other links</a></li>
						</ol>
					</li>
				</ol>
			</div>
			<div id="bodyContent">
				<div id="basics" class="section">
					<h2 id="s1">1 - The Basics</h2>
					<p class="note">
						Before we begin our journey, let me give some advice. 
						Throughout this tutorial you will see a lot of text and a 
						lot of code. For optimal learning power, it is advised 
						that you read the text and <b>try</b> the code. Then study
						the code.
						<br />You can copy and paste most examples on this page.
						<br />If you get confused, try reading the section again.
					</p>

					<h3 id="s11">a. Downloading and installing AutoHotkey</h3>

					<script type="text/javascript">
					if ('file:mk:ms-its:'.indexOf(location.protocol) != -1)
						document.write('<p class="note">' + translate.tutLocalMessage + '</p>');
					</script>
					<p>
						Before learning to use AutoHotkey (AHK), you will need
						to download it. After downloading it, you may possibly
						need to install it. But that depends on the version you want.
						For this guide we will use the Installer since it is easiest  to set up.
					</p>


					<h3>Text instructions:</h3>
					<ol>
						<li>Go to the AutoHotkey Homepage. 
							<a href="http://ahkscript.org/">http://ahkscript.org/</a>
						</li>
						<li>Click Download.
							<a href="http://ahkscript.org/download/ahk-install.exe">http://ahkscript.org/download/ahk-install.exe</a>
						</li>
						<li>
							During installation of AutoHotkey, you will be asked
							to choose from UNICODE or ANSI. In short, you would
							probably want to choose UNICODE. It has support for
							non-English letters and numbers (characters). Keep
							going until you see an Install button.
						</li>
						<li>Once done, great! Continue on to section b.</li>
					</ol>
					<p class="note">Video instructions:<br />
						Frankie's "Install and Hello World"<br />
						<a href="http://www.autohotkey.com/forum/viewtopic.php?t=77674">http://www.autohotkey.com/forum/viewtopic.php?t=77674</a>
					</p>

					<h3 id="s12">b. How to create a script</h3>
					<p>
						Once you have AutoHotkey installed, you will probably want
						it to do stuff. AutoHotkey is not magic, we all wish it
						was, but it is not. So we will need to tell it what to do.
						This process is called "Scripting".
					</p>

					<h3>Text instructions:</h3>
					<ul>
						<li>1. Right-Click on your desktop.</li>
						<li>2. Find "New" in the menu.</li>
						<li>3. Click "AutoHotkey Script" inside the "New" menu.</li>
						<li>4. Give the script a new name. Note: It must end with a .ahk extension. Ex. MyScript.ahk</li>
						<li>5. Find the newly created file on your desktop and Right-Click it.</li>
						<li>6. Click "Edit Script".</li>
						<li>7. A window should have popped up, probably Notepad. If so, SUCCESS!
						<hr />
						<p>
							So now that you have created a script, we need to add 
							stuff into the file. For a list of all built-in 
							commands, function and variables, 
							see <a href="#s5">section 5</a>.<br />
						</p>
						<p>
							Here is a very basic script containing a Hotkey which types text using the <a href="commands/Send.htm">Send</a> command when the hotkey is pressed.
						</p>

<pre>
^j::
   Send, My First Script
Return
</pre>
						<p>
							We will get more in-depth later on. Until then, here's an
							explanation of the above code.<br />

							- The first line. <code>^j::</code> is 
							the Hotkey. <code>^</code> means 
							<span class="key">CTRL</span>, 
							<code>j</code> is the letter 
							<span class="key">j</span>. Anything to the <b>left</b> of
							<code>::</code> are the keys you need to press.<br />

							- The second line. <code>Send, My First Script</code> is how you SEND keystrokes. <code>SEND</code> is the command, anything after the comma (,) will be typed.<br />

							- The third line. <code>Return</code>. Return will become your best friend. It literally STOPS code from going any further, to the lines below. This will prevent many issues when you start having a lot of stuff in your scripts.
						</p>
						<hr />
						<li>8. Save the File.</li>
						<li>9. Double-Click the file/icon in the desktop to run it. Open notepad or (anything you can type in) and press <span class="key">Ctrl</span> and <span class="key">J</span>.</li>
						<li>10. Hip Hip Hooray! Your first script is done. Go get some reward snacks then return to reading the rest of this tutorial.</li>
					</ul>

					<p class="note">
						Video instructions:<br />
						Frankie's "Install and Hello World"<br /><a href="http://www.autohotkey.com/forum/viewtopic.php?t=77674">http://www.autohotkey.com/forum/viewtopic.php?t=77674</a>

					</p>
					<h3 id="s13">c. You cannot merge commands</h3>
					<p>
						When you are making your code, you might have the urge to
						put several commands on the same line or inside of each
						other, don't. <a href="#s5">In section 5</a> we'll talk about why it 
						doesn't work as you might expect and what you can do 
						instead.
					</p>

					<h3 id="s14">d. Other basic info</h3>
					<div>
						How to find the Help File on your computer:<br />
						There are a few ways to do this, I'll assume you have it installed to the default locations.<br /><br />
						Method 1:
						<ol>
							<li>Find the Start menu or Start Orb on your screen, usually in the lower left.</li>
							<li>Click <b>Programs</b> or <b>All Programs</b>.</li>
							<li>Find <b>AutoHotkey</b> in the list.</li>
							<li>You should then see <b>AutoHotkey Help File</b>. Click it.</li>
							<li>Done!</li>
						</ol>
						Method 2:
						<ol>
							<li>Go to your desktop.</li>
							<li>Find <b>My Computer</b> or <b>Computer</b>. Open it.</li>
							<li>Go into your harddrive that contains <b>AutoHotkey</b>. Probably <b>C:\</b> drive.</li>
							<li>Search within all <b>Program Files</b> folders for <b>AutoHotkey</b>.</li>
							<li>Look for <b>AutoHotkey.chm</b> or a file that says AutoHotkey and has a yellow question mark on it.</li>
							<li>Done!</li>
						</ol>
					</div>
					<p class="note">
						Online Links:<br />
						<a href="http://ahkscript.org/docs/">Documentation</a><br />
						<a href="http://ahkscript.org/docs/commands/">Command List</a><br />
						<a href="http://ahkscript.org/docs/Functions.htm#BuiltIn">Functions</a><br />
						<a href="http://ahkscript.org/docs/Variables.htm">Variables</a>
					</p>
				</div>
				<div id="hotkeys_and_hotstrings" class="section">
					<h2 id="s2">2 - Hotkeys &amp; Hotstrings</h2>

					<p>
						What is a Hotkey? A hotkey is a key that is hot to the touch. ... Just kidding. It is a key or key combination that the person at the keyboard presses to trigger some actions.<br />
						What is a Hotstring? Hotstrings are mainly used to expand abbreviations as you type them (auto-replace), they can also be used to launch any scripted action.
					</p>

					<p>Here is a hotkey:</p>

<pre>
^j::
   Send, My First Script
Return
</pre>

					<p>Here is a hotstring:</p>

<pre>
::ftw::Free the whales
</pre>

					<p>The difference between the two examples is that the hotkey will be triggered when you press <span class="key">CTRL &amp; J</span> while the hotstring will convert your typed "ftw" into "Free the whales".</p>
					<p>
						<i>"So, how exactly does a person such as myself create a hotkey?"</i>
						Good question. A hotkey is created by using a single pair of ::'s. The key or key combo needs to go on the <b>left</b> of the <code>::</code>. And the content needs to go below, followed by a <code>Return</code>.<br />
					</p>
					<p class="note">Note: There are exceptions, but those tend to cause confusion a lot of the time. So it won't be covered in the tutorial, at least, not right now.</p>
<pre>
esc::
   MsgBox Escape!!!!
Return
</pre>
					<p>A hotstring has a pair of ::'s on each side of the text you want to trigger the text replacement. While the text to replace your typed text goes on the <b>right</b> of the second pair of ::'s.</p>
					<p>Hotstring, as mentioned above, can also launch scripted actions. That's fancy talk for <i>"do pretty much anything"</i>. Same with hotkeys.</p>
<pre>
::btw::
   MsgBox You typed "btw".
Return
</pre>

					<p>
						A nice thing to know is that you can have many lines of 
						code for each hotkey, hotstring, label, and a lot of other
						things we haven't talked about yet.
					</p>

<pre>
^j::
   MsgBox Wow!
   MsgBox this is
   Run, Notepad.exe
   winactivate, Untitled - Notepad
   WinWaitActive, Untitled - Notepad
   send, 7 lines{!}{enter}
   sendinput, inside the ctrl{+}j hotkey
Return
</pre>

					<h3 id="s21">a. Keys and their mysterious symbols</h3>

					<div>
						You might be wondering <i>"How the crud am I supposed to know that ^ means CTRL?!"</i>. Well, good question. To help you learn what ^ and other symbols mean, gaze upon this chart:<br />
						<table class="info">
							<tr><th>Symbol</th><th>Description</th></tr>
							<tr><td><strong>#</strong></td><td>Win (Windows logo key)</td></tr>
							<tr><td><strong>!</strong></td><td>Alt</td></tr>
							<tr><td><strong>^</strong></td><td>Control</td></tr>
							<tr><td><strong>+</strong></td><td>Shift</td></tr>
							<tr>
								<td>
									<strong>&amp;</strong>
								</td>
								<td>
									An ampersand may be used between any two keys or mouse
									buttons to combine them into a custom hotkey.
								</td>
							</tr>
						</table>
						<p>
							<strong>
								(For the full list of symbols, see the <a href="Hotkeys.htm">Hotkey</a> page)
							</strong>
						</p>
					</div>
					<p>
						Additionally, here is a list of all/most hotkey names that can be used on the <b>left</b> side of a hotkeys :: symbol:<br /><a href="KeyList.htm">KeyList.htm</a>
					</p>
					<p>
						You can define a custom combination of two (and only two) 
						keys (except joystick buttons) by using <b>&amp;</b> between
						them. In the below example, you would hold down 
						<span class="key">Numpad0</span> then press the second 
						key to trigger the hotkey:
					</p>

<pre>
Numpad0 &amp; Numpad1::
   MsgBox You pressed Numpad1 while holding down Numpad0.
Return

Numpad0 &amp; Numpad2::
	Run Notepad
Return
</pre>

					<p>
						But you are now wondering if hotstrings have any cool modifiers since hotkeys do. Yes, they do!<br />
						Hotstrings modifiers go between the first set of ::'s. Such as:
					</p>

<pre>
:*:ftw::Free the whales
</pre>

					<p class="note">
						For additional hotkey and hotstring modifiers, information and examples, visit:<br />
						<a href="Hotkeys.htm">Hotkeys</a><br />
						<a href="Hotstrings.htm">Hotstrings</a>
					</p>
					<h3 id="s22">b. Window specific hotkeys/hotstrings</h3>

					<p>Sometime you might want a hotkey or hotstring to only work (or be disabled) in a certain window. To do this, you will need to use either of these fancy commands with a # in-front of them.</p>
					<p>#IfWinActive<br />
					#IfWinExist</p>
					<p>
						These special commands (technically called "directives") create context-sensitive hotkeys and hotstrings. Simply specify a window title. But in some cases you might want to specify an HWND, group, or class. Those are a bit advanced and are covered more in-depth here: <a href="commands/_IfWinActive.htm">#IfWinActive</a>.
					</p>
<pre>
#IfWinActive Untitled - Notepad
#space::
   MsgBox You pressed Win+Spacebar in Notepad.
Return
#IfWinActive
</pre>
					<p>To turn off context sensitivity, specify any #IfWin command but leave all of its parameters blank. For example:</p>
<pre>
<em>; Notepad</em>
#IfWinActive untitled - Notepad
!q::
   MsgBox, You pressed Alt and Q in Notepad.
Return
#IfWinActive

<em>; Any window that isn't Untitled - Notepad</em>
!q::
   MsgBox, You pressed Alt and Q in any window.
Return
</pre>
					<p>When #IfWin commands are turned off (or never used in a 
					script), all hotkeys and hotstrings are enabled for all windows.</p><br />
					<p>The #IfWin commands are positional: they affect all hotkeys and hotstrings physically beneath them in the script.</p>

<pre>
<em>; Notepad</em>
#IfWinActive ahk_class Notepad
#space::
   MsgBox, You pressed Win+Spacebar in Notepad.
Return
::msg::You typed msg in Notepad
#IfWinActive

<em>; MSPaint</em>
#IfWinActive untitled - Paint
#space::
   MsgBox, You pressed Win+Spacebar in MSPaint!
Return
::msg::You typed msg in MSPaint!
#IfWinActive
</pre>
					<p class="note">For more in-depth information and similar 
					commands, check out:<br />
					<a href="commands/_IfWinActive.htm">#IfWinActive</a></p>
					<h3 id="s23">c. Multiple hotkeys/hotstrings per file</h3>			   
					<p>This, for some reason crosses some people's minds. So 
					I'll set it clear: AutoHotkey has the ability to 
					have <i>as many</i> hotkeys and hotstrings in 1 
					file as you want. Whether it's 1, or 3253 (or more).</p>
<pre>
#i::
   run, http://www.google.com/
Return

^p::
   run, notepad.exe
Return

~j::
   send, ack
Return

:*:acheiv::achiev
::achievment::achievement
::acquaintence::acquaintance
:*:adquir::acquir
::aquisition::acquisition
:*:agravat::aggravat
:*:allign::align
::ameria::America
</pre>

					<p>The above code is perfectly acceptable. Multiple hotkeys, multiple hotstrings. All in one big happy script file.</p>


					<h3 id="s24">d. Examples</h3>
<pre>::btw::By the way                          <em>; Replaces "btw" with "By the way" as soon as you press an <a href="commands/_Hotstring.htm">EndChar</a>.</em>
:*:btw::By the way                         <em>; Replaces "btw" with "By the way" without needing an EndChar</em>

^n::                                       <em>; Ctrl &amp; n Hotkey</em>
   run, notepad.exe                        <em>; Run the program notepad.exe when you press Ctrl &amp; n</em>
Return                                     <em>; This ends the hotkey. The code below this will not get triggered.</em>

^b::                                       <em>; Ctrl &amp; b Hotkey</em>
   send, {ctrl down}c{ctrl up}             <em>; Copies the selected text. ^c could be used as well, but this method is more secure.</em>
   SendInput, [b]{ctrl down}v{ctrl up}[/b] <em>; Wraps the selected text in bbcode (forum) Bold tags.</em>
Return                                     <em>; This ends the hotkey. The code below this point will not get triggered.</em>
</pre>

					<!-- PAGE 2 -->
					<!-- PAGE 2 -->
					<!-- PAGE 2 -->
				</div>
				<div id="sending_keystrokes" class="section">
					<h2 id="s3">3 - Sending key strokes</h2>
					<p>
						So now you decided that you want to send (type) keys to a 
						program. We can do that. Use the <a href="commands/Send.htm">Send</a> command. Send literally sends keystrokes, to simulate typing or pressing of keys.<br /><br />
						Before we get into things, here are some common issues 
						that people have:<br />
						Just like Hotkeys, Send has special keys too. <a href="commands/Send.htm">Lots and lots of them.</a><br />
						Here are the 4 most common symbols:
					</p>
					<div>
						<hr />
						<p><span class="red">!</span>: Sends the ALT key. For example, <em>Send This is text!a</em> would send the keys "This is text" and then press ALT+a. <strong>Note</strong>: !A produces a different effect in some programs than !a. This is because !A presses ALT+SHIFT+A and !a presses ALT+a. If in doubt, use lowercase.</p><p><span class="red">+</span>: Sends the SHIFT key. For example, <em>Send +abC </em>would send the text "AbC", and <em>Send !+a</em> would press ALT+SHIFT+a.</p><p><span class="red">^</span>: Sends the CONTROL (Ctrl) key. For example, <em>Send ^!a</em> would press CTRL+ALT+a, and <em>Send ^{Home}</em> would send CONTROL+HOME. <strong>Note</strong>: ^A produces a different effect in some programs than ^a. This is because ^A presses CONTROL+SHIFT+A and ^a presses CONTROL+a. If in doubt, use lowercase.</p><p><span class="red">#</span>: Sends the WIN key (the key with the Windows logo) therefore <em>Send #e</em> would hold down the Windows key and then press the letter "e".</p>
					</div>
					<p><i><strong>The next couple of paragraphs are talking about the <a href="commands/Send.htm">table on send page</a>.</strong><br /></i></p>
					<p class="note">
						Note:<br />This table <b>does not</b> apply to <a href="Hotkeys.htm">hotkeys</a>. Meaning, you do not wrap <span class="key">CTRL</span> or <span class="key">ENTER</span> (or any other key) inside {}'s when making a hotkey.
					</p><br />

					<div>
						An example showing what shouldn't be done to a hotkey:
<pre>
<em>; When making a hotkey...
; WRONG</em>
{LCtrl}::
   send, AutoHotkey
Return

<em>; CORRECT</em>
LCtrl::
   send, AutoHotkey
Return
</pre>
					</div>
					<hr />
					<div>
						<p>The gigantic table above shows pretty much every special key built-in to AHK. Such as: <code>{enter}</code> and <code>{space}</code>.<br />
						A common issue lots of people have is they assume that the curly brackets are put in the documentation pages just for fun. But in fact <b>they are needed</b>. It's how AHK knows that <code>{!}</code> means "exclamation point" and not "press the <span class="key">Alt</span> key". So please remember to check the table on the <a href="commands/Send.htm">send</a> page and make sure you have your brackets in the right places.</p>
<pre>
<em>; Notice the ! is in {}'s? That's because if it wasn't, AHK would
; press the ALT key.</em>
send, This text has been typed{!}
</pre>

<pre>
<em>; Same as above, but with the ENTER key. AHK would type out "enter" if ...
; ... it wasn't wrapped in {}'s.</em>
send, Multiple enter lines have enter been sent. <em>; WRONG</em>
send, Multiple{enter}lines have{enter}been sent. <em>; CORRECT</em>
</pre>
						<div>
							Another common issue is that people think that <b>everything</b> needs
							to be wrapped in brackets with the send command. That is FALSE. If 
							it's not in the chart, it does not need brackets. You do <b>not</b>
							need to wrap common letters, numbers or even some symbols (such as . 
							(period)) in {}'s.<br /> 
							Also, with the Send commands you are able to send more than 1 letter,
							number or symbol at a time. So no need for a bunch of Send commands 
							with 1 letter each.

<pre>
<em>; Don't wrap words or individual letters that are not in the table mentioned above.</em>
send, {a}       <em>; WRONG</em>
send, {b}       <em>; WRONG</em>
send, {c}       <em>; WRONG</em>
send, {a}{b}{c} <em>; WRONG</em>
send, {abc}     <em>; WRONG</em>
send, abc       <em>; CORRECT</em>
</pre>
						</div>
						<div>
							To hold down or release a key, enclose the key name in brackets and then use the word UP or DOWN.

<pre>
<em>; This is how you hold 1 key down and press another key (or keys).
; If 1 method doesn't work in your program, please try the other.</em>
send, ^s                     <em>; Both of these send CTRL+s</em>
send, {ctrl down}s{ctrl up}  <em>; Both of these send CTRL+s</em>
Send, {ctrl down}c{ctrl up}
Send, {b down}{b up}
Send, {TAB down}{TAB up}
Send, {Up down}  <em>; Press down the up-arrow key.</em>
Sleep, 1000      <em>; Keep it down for one second.</em>
Send, {Up up}    <em>; Release the up-arrow key.</em>
</pre>
						</div>
					</div>
					<div>
							But now you are wondering 
							<i>"How can I make my really long send commands readable?"</i>.
							Easy. Use what is known as a Continuation Section. Simply specify an 
							opening parenthesis on a new line, then your content, finally a closing 
							parenthesis on its own line. For more information, read about 
							<a href="Scripts.htm#continuation">Continuation Sections</a>.
<pre>
send,
(
Line 1
Line 2
Apples are a fruit.
)
</pre>

					</div>
					<p class="note">
						Note: There are several different forms of send. Each has their own special features. If one form of send does not work for your needs, try another type of send. Simply replace the commands name "send" with "sendPlay" or whatever you want.<br />
						Here are most ways to send text:<br />
						Send<br />
						SendRaw<br />
						SendInput<br />
						SendPlay<br />
						SendEvent<br />
						For more information on what each one does, <a href="commands/Send.htm">read this</a>.
					</p>
					<h3 id="s31">a. Games </h3>
					<p>
						<b><span style="color:red;">This is important!</span></b><br />
						A lot of games, especially modern ones, have cheat prevention software. 
						Things like GameGuard, Hackshield, PunkBuster and several others. 
						If a game has a cheat prevention system and your hotkeys,
						hotstrings and send commands do not work, you are out of luck.<br />
						Not only is bypassing these systems in violation of the games policies
						and will get you banned, they are complex to work around. 
						There are methods that can increase the chance of working in some games, but there is no 
						magical <i>"make it work in my game now!!!"</i> button. so try <b>ALL</b> 
						of these before giving up.<br />
					</p>

					<p>
						There are also known issues with DirectX. If you are having issues 
						and you know the game uses DirectX, try the stuff below. You should 
						also try running the game in Windowed Mode, if possible. That fixes 
						some DirectX issues.<br />
						More DirectX issues may occur when using pixel or image commands. 
						Colors might turn out black (0x000000) no matter the color you try 
						to get. That is another tricky thing to fix. Try running in Windowed Mode if you can.
					</p>
					<p>
						There is no single solution to make AutoHotkey work in all programs. 
					 If everything you try fails, it may not be possible to use AutoHotkey for your needs.
					</p>
					<div>
						<hr />
						From the <a href="FAQ.htm#games">FAQ</a> page:<br />
						Some games use DirectInput exclusively. As a side-effect, they might ignore all simulated keystrokes and mouse clicks. To work around this, try one of the following (or a combination):
						<ul>
							<li>Use <a href="commands/Send.htm#SendPlayDetail">SendPlay</a> via: 1) the SendPlay command; 2) using <a href="commands/SendMode.htm">SendMode</a> Play; and/or 3) the <a href="Hotstrings.htm#SendMode">hotstring</a> option SP.</li>
							<li>Increase <a href="commands/SetKeyDelay.htm">SetKeyDelay</a>. For example:</li>
							<li><code>SetKeyDelay, 0, 50</code></li>
							<li><code>SetKeyDelay, 150, 150, Play</code></li>
							<li>Try <a href="commands/ControlSend.htm">ControlSend</a>, which might work in cases where the other Send modes fail.</li>
						</ul>
					</div>
					<!-- PAGE 3 -->
					<!-- PAGE 3 -->
					<!-- PAGE 3 -->
				</div>
				<div id="running_programs_and_websites" class="section">
					<h2 id="s4">4 - Running programs &amp; websites</h2>
					<div>
						To run a program such as <i>Mspaint.exe, Calc.exe, script.ahk</i> or even a folder, you can use the <a href="commands/Run.htm">Run</a> command. It can even be used to open URLs such as <a href="http://ahkscript.org/">http://ahkscript.org/</a> . If your computer is setup to run the type of program you want to run, it's very simple:

<pre>
<em>; Run a program. Note: most programs will require a FULL file path.</em>
Run, %A_ProgramFiles%\Some_Program\Program.exe

<em>; Run a website</em>
Run, http://ahkscript.org
</pre>
					</div>
					<div>
						There are some other advanced features as well, such as Command-Line parameters and CLSID.<br />
						If you want to learn more about that stuff, visit the <a href="commands/Run.htm">run page</a>.
						<br />
						Here are a few more samples:
<pre>
<em>; Several programs do not need a full path, such as Windows-standard programs.</em>
Run, Notepad.exe
Run, MsPaint.exe

<em>; Run the "My Documents" folder using the built-in <a href="Variables.htm#BuiltIn">AHK variable</a></em>
Run, %A_MyDocuments%

<em>; Run some websites</em>
Run, http://ahkscript.org
Run, http://www.google.com
</pre>
						<br />
						<p class="note">For more in-depth information and examples, check out:<br /><a href="commands/Run.htm">commands/Run.htm</a>.</p>
					</div>


					<!-- PAGE 4 -->
					<!-- PAGE 4 -->
					<!-- PAGE 4 -->
				</div>
				<div id="commands_vs_functions" class="section">
					<h2 id="s5">5 - Commands vs. Functions()</h2>
					<div>
						AutoHotkey has two main types of things used by the scripter to create code:<br />
						Commands and Functions()<br />
						<p class="note">Helpful links:<br />
							A list of all commands: <a href="commands/index.htm">commands/index.htm</a><br />
							A list of all built-in functions: <a href="Functions.htm#BuiltIn">Functions.htm#BuiltIn</a></p>
					</div>
					<h3>Commands</h3>
					<p>
						You can tell what a command is by looking at its syntax (the way it looks). Commands do not use parenthesis "()" around the parameters like functions do. So a command would look like this:<br />
						<code>Command, parameter1, parameter2, parameter3</code><br />

						<br />When using commands, you cannot squish other commands onto the same line as a previous command (exception:  <a href="commands/IfEqual.htm">ifEqual</a>).<br />
						You cannot put commands inside the parameters of other commands.
					</p>

<pre>
Msgbox, Hello Run, Notepad.exe   <em>; Wrong</em>
Msgbox, Hello, Run, Notepad.exe  <em>; Wrong</em>

Msgbox, Hello      <em>; Correct</em>
Run, Notepad.exe
</pre>

					Commands also differ from function in that they use "traditional syntax". Meaning: when you use a <code>variable</code>, you NEED to use %'s around it. <code>%variable%</code>. Any text and numbers do not need to be in "quotation marks". <code>This is some text</code>. Additionally, you cannot do math in the parameters, unlike functions().
					<p class="note">
						You can do math in parameters if you force an expression with a single <code>%</code>, but that will not be covered.
					</p>
					<h3>Functions</h3>
					<div>
						As stated above, functions are different because they use parenthesis. A typical function looks like:<br />
						<code>Function(parameter1, parameter2, parameter3)</code><br /><br />
						Functions have a few main differences:
						<ol>
							<li>
								You can do math in them.<br />
								-- <code>SubStr(37*12, 1, 2)</code><br />
								-- <code>SubStr(A_Hour-12, 2)</code>
							</li>
							<li>
								Variables do not need to be wrapped in percent signs.<br />
								-- <code>SubStr(A_Now, 7, 2)</code>
							</li>
							<li>
								Functions can go inside of functions.<br />
								-- <code>SubStr(A_AHKPath, inStr(A_AHKPath, "AutoHotkey"))</code>
							</li>
							<li>
								Text needs to be wrapped in quotes.<br />
								-- <code>SubStr("I'm scripting, awesome!", 16)</code>
							</li>
						</ol>

						Functions usually return a value differently than a command does. Commands need an <i>OutputVar</i> parameter, functions do not. The most common way to assign a variable to the value of a function is like so:<br />
						<code><span style="color:#ff4400"><b>MyVariable</b></span>:=Function(Parameters)</code>

<pre>
<span style="color:#ff4400"><b>MyVariable</b></span>:=SubStr("I'm scripting, awesome!", 16)
</pre>
					<p class="note">This isn't the only way, but it's the most common. You are assigning <code>MyVariable</code> to the value of the function (in this case, <code>SubStr(...)</code>) that is to the right of the :=.<br />
					<a href="Functions.htm">More about Functions</a></p>
					</div>
					<div>
						In short:

<pre>
<em>; These are commands</em>
Msgbox, This is some text.
StringReplace, Output, Input, AutoHotKey, AutoHotkey, ALL
SendInput, This is awesome{!}{!}{!}

<em>; These are Functions</em>
SubStr("I'm scripting, awesome!", 16)
FileExist(VariableContainingPath)
Output:=SubStr("I'm scripting, awesome!", 16)
</pre>

					</div>
					<h3 id="s51">a. Code blocks</h3>
					<p>
						<a href="commands/Block.htm">Code blocks</a> are little curly brackets (<b>{</b> and <b>}</b>) that are there to group a section of code together so that AutoHotkey knows it's one big family and that it needs to stay together. They are most often used with <i>If</i> and <i>Loop</i>s. Without them, only the first line in the block is called.<br /><br />
					</p>
					<div>
						In the following code, both lines are run only if var equals 5.
<pre>
if (var=5)
{
   MsgBox, var equals %var%!!
   Exitapp
}
</pre><br />

						In the following code, the msgbox is only shown if var equals 5. The code will always exit, even if var <b>isn't</b> 5.

<pre>
if (var=5)
   MsgBox, var equals %var%!!
   Exitapp
</pre><br />

						This is perfectly fine since the if only had 1 line of code associated with it. It's exactly the same as above, but I outdented the second line so we know it's separate from the if.

<pre>
if (var=5)
   MsgBox, var equals %var%!!
MsgBox, We are now 'outside' the if. We did not need {}'s since there was only 1 line below it.
</pre>
					</div>
					<!-- PAGE 5 -->
					<!-- PAGE 5 -->
					<!-- PAGE 5 -->
				</div>
				<div id="variables" class="section">
					<h2 id="s6">6 - Variables</h2>
					<p>
						<a href="Variables.htm">Variables</a> are like little post-it notes that hold some information. They can be used to store text, numbers, data from functions and commands or even mathematical equations. Without them, programming &amp; scripting would be much more tedious.
					</p>
					<hr />
					<div>
						Variables can be assigned a few ways, We'll cover the most common forms. Please pay attention to the equal sign (=).
						<ol>
							<li><code>variable=text</code><br />
								<div class="indented">This is the simplest form for a variable, traditional assignment. Simply type in your text and done.</div>
							</li>
							<li><code>variable=%variable2%</code><br />
								<div class="indented">Same as above, but you are assigning a variable to a different variables value.</div>
							</li>
							<li><code>variable:="text"</code><br />
								<div class="indented">This is an expression assignment, due to the : before the =. Any text needs to be in "quotes".</div>
							</li>
							<li><code>variable:=variable2</code><br />
								<div class="indented">In expression mode, variables do not need %'s.</div>
							</li>
							<li><code>variable:=6+8/3*2-sqrt(9)</code><br />
								<div class="indented">Thanks to expressions, you can do math!</div>
							</li>
						</ol>
						Number 1 &amp; 2 can be combined. <code>var=%var2% some text %var3%.</code><br />
						3, 4 &amp; 5 can be combined too. <code>var:="The value of 5+ " Variable " is: " 5+Variable</code>
					</div>
					<hr />

					<p class="note">
						Any equal sign (<b>=</b>) with a symbol in front of it is called an <b>Assignment Operator</b>, which are always an expression. So <code>:=</code> <code>+=</code> <code>-=</code> <code>.=</code> etc. always use expressions.
					</p>
					<h3 id="s61">a. When to use percents</h3>
					<p>
						One of the most common issues with AutoHotkey involving variables is when to use the percent signs (<b>%</b>). Hopefully this will clear some confusion.
					</p>
					<div>
						When to use %'s:
						<ol>
							<li>When you are using Commands (see above) you use percent signs.<br />
							-- Except when the parameter is OutputVar or InputVar.</li>
							<li>When you are assigning a variable to a value using a traditional mode (an equal sign with no symbol in front of it).</li>
						</ol>

						When <b>not</b> to use %'s:
						<ol>
							<li>In parameters that are input or output variables, For example: <code>StringLen, <span style="color:red">OutputVar</span>, <span style="color:red">InputVar</span></code></li>
							<li>On the left side of an assignment: <code><span style="color:red">Var</span> = 123abc</code></li>
							<li>On the left side of traditional (non-expression) if-statements: <code>If <span style="color:red">Var1</span> &lt; %Var2%</code></li>
							<li>Everywhere in expressions. For example:
<pre>
If (<span style="color:red">Var1</span> != <span style="color:red">Var2</span>)
   <span style="color:red">Var1</span> := <span style="color:red">Var2</span> + 100
</pre>
							</li>
						</ol>
					</div>



					<h3 id="s62">b. Getting user input</h3>
					<div>
						Sometimes you want to have the user to choose the value of stuff. There are several ways of doing this, but the simplest way is <a href="commands/InputBox.htm">Inputbox</a>. Here is a simple example on how to ask the user a couple of questions and doing some stuff with what was entered.

<pre>
InputBox, OutputVar, Question 1, What is your first name?
if (OutputVar="Bill")
   MsgBox, That's is an awesome name, %OutputVar%.

InputBox, OutputVar2, Question 2, Do you like AutoHotkey?
if (OutputVar2="yes")
   MsgBox, Thank you for answering %OutputVar2%`, %OutputVar%! We will become great friends.
else
   MsgBox, %OutputVar%`, That makes me sad.
</pre>
					</div>

					<h3 id="s63">c. other examples?</h3>
					<div>
<pre>
<a href="commands/MsgBox.htm">MsgBox</a>, 4, , Would you like to continue?
<a href="commands/IfMsgBox.htm">IfMsgBox</a>, No
   Return                <em>; If No, stop the code from going further.</em>
MsgBox You pressed YES.  <em>; Otherwise, the user picked yes.</em>
</pre>
<pre>
<em>; Some examples showing when to use percents and when not</em>
Variable=text                      <em>; Assign a variable some text using 'traditional' assignment.</em>
VariableNumber:=6                  <em>; Assign a variable a number using 'expressional' assignment.</em>
Variable2=%Variable%               <em>; Assign a variable to another variable using traditional assignment.</em>
Variable3:=Variable                <em>; Assign a variable to another variable using expressional assignment.</em>
Variable4.=Variable                <em>; Append a variable to the end of another variable using expressional assignment.</em>
Variable5+=VariableNumber          <em>; Add the value of a variable to another variable using expressional assignment.</em>
Variable5-=VariableNumber          <em>; Subtract the value of a variable from another variable using expressional assignment.</em>
Variable6:=SubStr(Variable, 2, 2)  <em>; Variable inside a function. This is always an expression.</em>
Variable7=%Variable% Text          <em>; Assigns a variable to another variable with some extra text using tradition assignment.</em>
Variable8:=Variable " Text"        <em>; Assigns a variable to another variable with some extra text using expressional assignment.</em>
MsgBox, %Variable%                 <em>; Variable inside a command. </em>
StringSplit, Variable, Variable, x <em>; Variable inside a command that uses InputVar and OutputVar.</em>
if (VariableNumber=6)              <em>; Whenever an IF has parenthesis, it'll be an expression. So no %'s.</em>
If (Variable != VariableNumber)    <em>; Whenever an IF has parenthesis, it'll be an expression. So no %'s.</em>
if VariableNumber=6                <em>; Without parenthesis, the if is Traditional. However, only variables on the 'right side' need %'s. </em>
If Var1 &lt; %Var2%                   <em>; Without parenthesis, the if is Traditional. However, only variables on the 'right side' need %'s. </em>
</pre>
					</div>
				<!-- PAGE 6 -->
				<!-- PAGE 6 -->
				<!-- PAGE 6 -->
				</div>
				<div id="objects" class="section">
					<h2 id="s7">7 - Objects</h2>
					<p>
						<a href="Objects.htm">Objects</a> are a way of organizing your data for more efficient usage. Sometimes objects are referred to as arrays, but it's important to note that all arrays are just objects. We call objects different things depending on what we are using them for, but all objects are the same.
					</p>
					<hr />
					An object is basically a collection of variables.
					The variable names are known as "Keys", and the contents of the variables are "Values".<br />
					<br />
					When you hear people calling an object an <i>array</i> or <i>indexed array</i>, it usually means that all the keys are sequential numbers 1 and up.<br />
					When you hear people calling an object an <i>associative array</i>, it means that the keys are either strings (text) or non-sequential numbers.
					Sometimes it's a mix of both, and sequential numbers too!<br />
					<br />
					There are no restrictions to what a key or value can be, and they can even be other arrays!
					<br />
					When the values are arrays too, this is referred to as a <i>nested array</i>, and these will be explained later.
					<hr />
					<div>
						There are a number of reasons you might want to use an object for something. Some examples:<br />
						<ol>
							<li>You want to have a numbered list of things, such as a grocery list (this would be referred to as an indexed array)</li>
							<li>You want to represent a grid, perhaps for a board game (this would be done with nested objects)</li>
							<li>You have a list of things where each thing has a name, such as the characteristics of a fruit (this would be referred to as an associative array)</li>
						</ol>
					</div>
					<h3 id="s71">a. Creating Objects</h3>
					<div>
						There are a few ways to create an object, and the most common ones are listed below<br />
						<ol>
							<li><code>MyObject := ["one", "two", "three", 17]</code><br />
								<div class="indented" >
									Bracket syntax.
									This will start you off with what is sometimes called an "indexed array".
									An indexed array is an object representing a list of items, numbered 1 and up.
									In this example, the value <code>"one"</code> is stored in object key <code>1</code> (aka index 1), and the value <code>17</code> is stored in object key <code>4</code> (aka index 4).
								</div>
							</li>
							<li><code>Banana := {"Shape": "Elongated", "Color": "Yellow", "Taste": "Delicious", "Price": 3}</code><br />
								<div class="indented" >
									Brace syntax.
									This will let you start of by defining what is sometimes called an "associative array".
									An associative array is a collection of data where each item has a name.
									In this example, the value <code>"yellow"</code> is stored in the object key <code>"color"</code>. Also, the value <code>3</code> is stored in the object key <code>"Price"</code>.
								</div>
							</li>
							<li><code>MyObject := Array("one", "two", "three", 17)</code><br />
								<div class="indented" >
									The "array" creation function. This is equivalent to the bracket syntax, but wrapped in a function.
								</div>
							</li>
							<li><code>Banana := Object("Shape", "Elongated", "Color", "Yellow", "Taste", "Delicious", "Price", 3)</code><br />
								<div class="indented" >
									The object creation function. This is equivalent to the brace syntax, but wrapped in a function.
								</div>
							</li>
						</ol>

						It's important to remember that every one of these definitions all create the same thing (objects), just with different keys.

					</div>

					<h3 id="s72">b. Using Objects</h3>
					There are many ways to use objects, including retrieving values, setting values, adding more values, and more.
					<div>
						<br />
						<strong>To set values:</strong>
						<div class="indented">
							Setting values in an object is as simple as setting the value of a variable.<br />
							All you have to do is put your bracket or dot notation (as seen in the retrieval section) on the left side of an expression assignment symbol <code>:=</code>.<br />
							<br />
							For example:<br />
							<code>Banana.Consistency := "Mushy"</code><br />
							<code>Banana["Pickled"] := True <em>; This banana has been pickled. Eww.</em></code>
						</div>
						<br />
						<strong>To retrieve values:</strong>
						<ol>
							<li><code>Value := Banana["Color"]</code><br />
								<div class="indented" >Bracket notation. This allows you to use an expression as the key to get the value from your object.
									In this case, I used the simple expression <code>"Color"</code>, which is (unsurprisingly) the key <code>Color</code>
									You will get a message box with the word "Yellow", because that is what we set the key <code>Color</code> to in the <a href="#s71">previous section</a>.
								</div>
							</li>
							<li><code>Value := Banana.Color</code><br />
								<div class="indented" >
									Dot notation. This only lets you use literal strings for the keys. You cannot use variables in your keys with dot notation.
								</div>
							</li>
						</ol>
						<br />
						<strong>To add new keys and values:</strong>
						<ol>
							<li>Directly adding values
								<div class="indented" >
									To directly add a key and value, just set a key that doesn't exist yet.
									For example:<br />
									<code>MyObject.NewKey := "Shiny"</code><br />
									<code>MyObject["NewerKey"] := 3.1415</code>
								</div>
							</li>
							<li>Inserting values
								<div class="indented" >
									Another way to add keys and values to an object is to use one of the following methods.<br />
									<br />
									<code>MyObject.InsertAt(Index, Value1, Value2, Value3...)</code><br />
									<i>Index</i> is any integer key. This will shift ALL higher integer keys up by the number of values which were inserted, even if there are gaps (for example, only keys 1 and 100 exist, and you insert a value at key 50, it will shift 100 up to 101).<br />
									<br />
									<code>MyObject.Push(Value1, Value2, Value3...)</code><br />
									This "appends" the values to the end of the array <i>MyObject</i>. In other words, it inserts the values at the highest integer key plus one.<br />
								</div>
							</li>
						</ol>
						<br />
						<strong>To remove keys and values:</strong>
						<ol>
							<li>Blanking the value out.<br />
								<div class="indented" >
									The simplest way to remove a value is to just blank it out. You can do this by setting it to "", also known as an <i>empty string</i>. This doesn't remove the key, but it will make the value appear identical to an unset value.<br />
									It is possible to tell that the key still exists by using the <code>HasKey</code> method, and it will still come up in a <code>for</code> loop. (for loops will be explained later)
								</div>
							</li>
							<li>Removing the key<br />
								<div class="indented" >
									There are a few different ways to remove both the key <i>and</i> the value. They are:
								</div>
								<ol>
									<li><code>RemovedValue := MyObject.Delete(AnyKey)</code>
										<div class="indented">
											The previous value of <code>MyObject[AnyKey]</code> will be stored in <i>RemovedValue</i>.
										</div>
									</li>
									<li><code>NumberOfRemovedKeys := MyObject.Delete(FirstKey, LastKey)</code>
										<div class="indented">
											Using the remove method in this way allows you to remove a range of numbered/integer or string keys between FirstKey and LastKey.<br />
											<br />
											The value it gives will be the number of keys that were removed, which is useful if you have a gap between your keys (eg, you specify keys 1 through four, but key number 2 doesn't exist, this will set NumberOfRemovedKeys to 3 as only three keys were there to be removed)
										</div>
									</li>
									<li><code>MyObject.Pop()</code>
										<div class="indented">
											This removes the highest integer key, and returns the value. There are no keys higher than it to be affected.
										</div>
									</li>
									<li><code>RemovedValue := MyObject.RemoveAt(Index)</code><br />
									<code>NumberOfRemovedKeys := MyObject.RemoveAt(Index, Length)</code>
										<div class="indented">
											This removes all keys from <i>Index</i> to <i>Index + Length - 1</i> (inclusive). If <i>Length</i> is omitted it defaults to 1. After removing the keys it takes all higher numbered/integer keys and moves them down to fill the gap, so that if there was a value at <i>Index + Length</i> it will now be at <i>Index</i>. This is similar to how the InsertAt method with multiple specified values works.
										</div>
									</li>
								</ol>
							</li>
						</ol>
					</div>

					<!-- PAGE 7 -->
					<!-- PAGE 7 -->
					<!-- PAGE 7 -->
				</div>
				<div id="helpful_goodies" class="section">
					<h2 id="s8">8 - Other helpful goodies</h2>
					<p>
						We have reached the end of our journey, my good friend. I hope you have learned something.
						But before we go, here are some other things that I think you should know. Enjoy!
					</p>
					<h3 id="s81">a. The mysterious []'s</h3>
					<div>
						Throughout the documentation, you will see these two symbols (<b>[</b> and <b>]</b>) surrounding code in the yellow syntax box at the top of almost all pages. Anything inside of these brackets are <b><i>OPTIONAL</i></b>. Meaning the stuff inside can be left out if you don't need them. When writing your code, it is very important to <b>NOT</b> type the []'s in your code.<br /><br />
						On the <a href="commands/ControlGetText.htm">ControlGetText</a> page you will see this (without the colors):<br />
						<code>ControlGetText, OutputVar <span style="color:red"><b>[</b></span><span style="color:navy">, Control, WinTitle, WinText, ExcludeTitle, ExcludeText</span><span style="color:red"><b>]</b></span></code><br /><br />
						So you could simply do this if you wanted:<br />
						<code>ControlGetText, OutputVar</code><br /><br />

						Or add in some more details:<br />
						<code>ControlGetText, OutputVar, Control, WinTitle</code><br /><br />

						What if you wanted to use ExcludeTitle but not fill in WinText or WinTitle? Simple!<br />
						<code>ControlGetText, OutputVar, Control,,, ExcludeTitle</code><br /><br />
						<p class="Note">
							Please note that you cannot IGNORE parameters, you can however leave them blank.<br />
							If you were to Ignore "WinTitle, WinText", it would look like this and cause issues:<br />
							<code>ControlGetText, OutputVar, Control, ExcludeTitle</code><br />
							This is valid.<br />
							<code>ControlGetText, OutputVar, Control,,, ExcludeTitle</code>
						</p>
					</div>
					<h3 id="s82">b. Finding your AHK version</h3>
					<div>
						Run this code to see your AHK version:
<pre>
MsgBox, %A_AHKVersion%
</pre>

						Or look for "AutoHotkey Help File" or "AutoHotkey.chm" in the start menu or your installation directory.
					</div>

					<h3 id="s83">c. Trial and Error</h3>
					<p>
						Trial and Error is a very common and effective way of learning. Instead of asking for help on every little thing, sometimes spending some time alone (sometimes hours or days) and trying to get something to work will help you learn faster.
					</p>
					<p>
						If you try something and it gives you an error, study that error. Then try to fix your code. Then try running it again. If you still get an error, modify your code some more. Keep trying and failing until your code fails no more. You will learn a lot this way by reading the documentation, reading errors and learning what works and what doesn't.
						<span class="InlineCode">Try, fail, try, fail, try, try, try, fail, fail, <b>succeed!</b></span>
					</p>
					<p>
						This is how a lot of "pros" have learned. But don't be afraid to ask for help, we don't bite (hard).
						Learning takes time, the "pros" you encounter did not learn to be masters in just a few hours or days.
					</p>
					<p class="Note">"If at first you don't succeed, try, try, try again." - Hickson, William E.</p>
					<h3 id="s84">d. Indentation</h3>
					<div>
						This stuff (indentation) is very important! Your code will run perfectly fine without it, but it will be a major headache for you and other to read your code. Small code (25 lines or less) will probably be fine to read without indentation, but it'll soon get sloppy. It's best you learn to indent ASAP.<br />
						Indentation has no set style, but it's best to keep everything consistent.<br />
						"<b>What is indentation?</b>" you ask? It's simply spacing to break up your code so you can see what belongs to what. People usually use 3 or 4 spaces or 1 tab per "level".<br /><br />
						No indents:

<pre>
if (car="old")
{
msgbox, the car is really old
if (wheels="flat")
{
msgbox, this car is not safe to drive.
Return
}
else
{
msgbox, Be careful! This old car will be dangerous to drive.
}
}
else
{
msgbox, My`, what a shiny new vehicle you have there.
}
</pre>

						Indented:

<pre>
if (car="old")
{
   msgbox, the car is really old
   if (wheels="flat")
   {
      msgbox, this car is not safe to drive.
      Return
   }
   else
   {
      msgbox, Be careful! This old car will be dangerous to drive.
   }
}
else
{
   msgbox, My`, what a shiny new vehicle you have there.
}
</pre>
						Wiki has various styles and examples. Choose what you like or learn to indent how you think it's easiest to read.<br />
						<a href="http://en.wikipedia.org/wiki/Indent_style">http://en.wikipedia.org/wiki/Indent_style</a>
					</div>

					<h3 id="s85">e. Asking for Help</h3>
					Before you ask, try doing some research yourself or try to code it yourself. If that did not yield results that satisfy you, read below.
					<ul>
						<li>Don't be afraid to ask for help, even the smartest people ask others for help.</li>
						<li>Don't be afraid to show what you tried, even if you think it's silly.</li>
						<li>Post anything you have tried.</li>
						<li>Pretend <i>everyone but you</i> is a doorknob and knows nothing. Give as much information as you can to educate us doorknobs at what you are trying to do. Help us help you.</li>
						<li>Be patient.</li>
						<li>Be polite.</li>
						<li>Be open.</li>
						<li>Be kind.</li>
						<li>Enjoy</li>
					</ul>

					If you don't get an answer right away, wait at least 1 day (24 hours) before asking for more help. We love to help, but we also do this for free on our own time. We might be at work, sleeping, gaming, with family or just too busy to help.<br />
					And while you wait for help, you can try learning and doing it yourself. It's a good feeling, making something yourself without help.

					<h3 id="s86">f. Other links</h3>
					<p>
						<a href="FAQ.htm">Frequently Asked Questions (FAQ)</a>
					</p>
				</div>
			</div>
		</div>
	</body>
</html>
